Execute the commands in the job
Parent Type: LearningStoreJob
Namespace: Microsoft.LearningComponents.Storage
Assembly: Microsoft.LearningComponents.Storage.dll
| C# |
|
public ReadOnlyCollection<object> Execute () |
A collection of output data from the job
| Exception type | Condition |
| Microsoft.LearningComponents.Storage.LearningStoreItemNotFoundException | The job failed because an item was not found in the store. |
| Microsoft.LearningComponents.Storage.LearningStoreConstraintViolationException | The job failed because of a constraint violation. |
| Microsoft.LearningComponents.Storage.LearningStoreSecurityException | The job failed because a security check failed. |
| System.InvalidOperationException | An AddOrUpdateItem command failed because multiple matching items were found. |
See the LearningStoreJob documentation for more information about jobs.
This method participates in transactions as follows:
The following code adds a new user to the store specified by "store":
| C# |
LearningStore store = new LearningStore("Server=Learning;Database=Mls;Integrated Security=true", "Bob");
Dictionary<string,object> propertyValues = new Dictionary<string,object>();
propertyValues["Name"] = "John Doe";
propertyValues["Key"] = "Company\JohnDoe";
LearningStoreJob job = store.CreateJob();
job.AddItem("UserItem", propertyValues);
ReadOnlyCollection<object> results = job.Execute();
|